package com.mayi.base;

public class XueQiangBubbleSort {
    public static void main(String[] args) {
        int[] array = {1, 3, 8, 4, 8, 3};
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length - i - 1; j++) {
                if (array[j] > array[j + 1]) {
                    int temp = array[j + 1];
                    array[j + 1] = array[j];
                    array[j] = temp;
                }
            }
            System.out.println(array[i]);
        }
    }
}

